#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>

typedef char elem;
typedef struct Node
{
	elem value;
	struct Node* left;
	struct Node* right;
}Node,* pNode;
typedef struct Que
{
	pNode p;
	struct Que* next;
}Que ,*pQue;

void Build_Tree(pNode* BiTree, pQue* qhead, pQue* qtail, elem val);
void preorder(pNode BiTree);
void midorder(pNode BiTree);
void latorder(pNode BiTree);